#include "surbat.h"
#include "../lib/ADC.h"
#include <reg167.h>

#define BAT_MIN 627		// [R3/(R2 + R3)]*80%*(2^10bits)

int TesterBat(int n,int log_2_n)
{
	int test=ADC_Lire_Valeur(1,n,log_2_n);
	//printf("%d\n",test);
	if(test<=BAT_MIN)
		return -1;
	else
		return 0;
}
  
